package com.shijie.sjoj.model.exception;

import com.shijie.sjoj.model.base.BaseException;

/**
 * 记录异常类
 *
 * @author ZSJ
 */
public class RecordException extends BaseException {

    protected RecordException(String message) {
        super(message);
    }

    /**
     * 抛出记录异常
     *
     * @param message String 错误信息
     * @return RecordException
     */
    public static RecordException throwError(String message) {
        return new RecordException(null != message ? message : EXCEPTION_DEFAULT_MESSAGE);
    }

    /**
     * 抛出记录异常
     *
     * @return RecordException
     */
    public static RecordException throwError() {
        return new RecordException(EXCEPTION_DEFAULT_MESSAGE);
    }


}
